<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/T_Merchant.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/T_Merchant.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'c_id',
                    footer: "Foots",
                    cnName: 'ERP商户管理',
                    name: 'T_Merchant',
                    url: "/TMerchants/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields: {"timeContainer":"","c_merchantName":"","c_merchantNumber":"","c_appid":"","c_appSecret":"","c_merchantKey":"","c_merchantCertificate":"","c_starttime":"","c_endtime":"","modifier":"","modifyDate":"","createDate":"","c_key":"","modifyID":"","createID":"","creator":""},
                editFormOptions: [[{"title":"商户名称","required":true,"field":"c_merchantName","type":"text"},
                                  {"title":"商户号","required":true,"field":"c_merchantNumber","type":"text"} ],
                                 [{"title":"AppId","required":true,"field":"c_appid","type":"text"},
                                  {"title":"AppSecret","required":true,"field":"c_appSecret","type":"text"}],
                                 [{"title":"商户密钥","required":true,"field":"c_merchantKey","type":"text"},
                                  {"title":"商户证书","required":true,"field":"c_merchantCertificate","type":"file",url: "/api/T_Merchant/Upload",}],
                                 [{"title":"有效期起止时间","required":true,"field":"timeContainer","colSize":12,"type":"datetime","range":true},],
                                 [{"title":"有效开始时间","field":"c_starttime","type":"datetime",hidden:true},
                                  {"title":"有效结束时间","field":"c_endtime","type":"datetime",hidden:true}],
                                  ],
                searchFormFields: {"c_merchantName":"","c_merchantNumber":"","c_starttime":"","c_endtime":"","c_merchantCertificate":"","creator":""},
                searchFormOptions: [[{"title":"商户名称","field":"c_merchantName","type":"like"},{"title":"商户号","field":"c_merchantNumber","type":"like"},{ "title": "有效开始时间", "field": "c_starttime", "type": "datetime" }],[
                {"title":"商户证书","field":"c_merchantCertificate","type":"like"},]],
                columns: [{field:'c_id',title:'主键',type:'string',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'c_merchantName',title:'商户名称',type:'string',width:100,align:'left',sortable:true},
                       {field:'c_merchantNumber',title:'商户号',type:'string',width:100,align:'left'},
                       {field:'c_appid',title:'AppId',type:'string',width:200,align:'left'},
                       {field:'c_appSecret',title:'AppSecret',type:'string',width:200,align:'left'},
                       {field:'c_merchantKey',title:'商户密钥',type:'string',width:220,align:'left'},
                       {field:'c_merchantCertificate',title:'商户证书',type:'file',width:150,align:'left'},
                       {field:'c_starttime',title:'有效开始时间',type:'date',width:130,align:'left',sortable:true},
                       {field:'c_endtime',title:'有效结束时间',type:'date',width:130,align:'left',sortable:true},
                       {field:'c_key',title:'ERP密钥',type:'string',width:250,align:'left'},
                       {field:'c_value',title:'ERP证书',type:'file',width:90,align:'left'},
                    //    {field:'spare1',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare2',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare3',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare4',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare5',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare6',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare7',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare8',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare9',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare10',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare11',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare12',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare13',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare14',title:'扩展字段1',type:'string',width:220,align:'left'},
                    //    {field:'spare15',title:'扩展字段1',type:'string',width:220,align:'left'},
                       {field:'modifier',title:'修改人',type:'string',width:180,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'date',width:90,align:'left',sortable:true},
                    //   {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'createDate',title:'创建时间',type:'date',width:90,align:'left',sortable:true},
                    //   {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
                       {field:'creator',title:'创建人',type:'string',width:180,align:'left'}
                    ],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
